package com.anjubao.parking.municipal.parkinglot.mapper;

import com.anjubao.parking.municipal.parkinglot.dto.ParkingStatDistrictParkingLotResDto;
import com.anjubao.parking.municipal.parkinglot.dto.ParkingStatSlotsFreeResDto;
import com.anjubao.parking.municipal.parkinglot.dto.ParkingStatSlotsZonesResDto;
import com.anjubao.parking.municipal.parkinglot.model.ParkingLotStatus;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author anjubao
 */
@Mapper
@Repository
public interface ParkingLotStatusMapper extends BaseMapper<ParkingLotStatus> {
    /**
     * 获得当日各类型停车场空位
     * @param cityId
     * @param type
     * @return
     */
    List<ParkingStatSlotsFreeResDto> findSlotsFree(Integer cityId, Integer type);

    /**
     *  获得当日各地区停车场空位
     * @param cityId
     * @return
     */
    List<ParkingStatSlotsZonesResDto> findSlotsZones(Integer cityId);

    /**
     * 统计包含停车场数和车位数 按地区统计
     @param cityId
      * @return
     */
    List<ParkingStatDistrictParkingLotResDto> getParkingStatParkingLots(Integer cityId);
}
